Skip to main content

Add X3M SDK and Loomit adapters to your app

Add the npm package

add the package react-native-xmediator to your app.

yarn:

yarn add https://react-native-artifact-registry.x3mads.com/react-native/react-native-xmediator-0.2.0.tgz

npm:

npm install https://react-native-artifact-registry.x3mads.com/react-native/react-native-xmediator-0.2.0.tgz

Add the native SDK dependencies to your app.

Pick networks you want to add to your app.

info

If you're looking to integrate an ad network that isn't currently listed, please contact our team or your account representative to discuss support and integration options.

Configure the XMediator provider

In the root of your app, usually in the App.tsx file, add the following code:

import { XMediatorProvider } from "react-native-xmediator";

export default function App() {
return (
<XMediatorProvider
appKey={"<YOUR_APP_KEY>"}
// other props
>
{/* your app code... */}
</XMediatorProvider>
);
}
tip

The XMediatorProvider has a autoInitialize prop (default: true). If set to false, you will need to use a useInitialize hook.